#ifndef ROBOT_H
#define ROBOT_H

#include "enemy.h"
#include "targa.h"

class MD2Model;

enum RobotAIState {
    ROBOT_RUNNING,
    ROBOT_IDLE,
	ROBOT_DEAD
};

class Robot : public Enemy
{
public:
	Robot(GameWorld* world);
	~Robot(void);

	virtual EntityType getType() const { return ROBOT; }
	virtual bool isStatic() { return false; }

	int getKey() { return m_key; }
	void setKey(int k) { m_key = k; }
private:
        virtual void onPrepare(float dT);
        virtual void onRender() const;
        virtual void onPostRender();
        virtual bool onInitialize();
        virtual void onShutdown();

        MD2Model* m_model;
        TargaImage m_robotTexture;
        unsigned int m_robotTextureID;

        void processAI();

        RobotAIState m_AIState;

        float m_currentTime;
        float m_lastAIChange;

        virtual void onKill();
        virtual void onResurrection();
		int m_key;
};

#endif
